/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package reportcenter.support.features;

import java.util.regex.Pattern;

/**
 *
 * @author renan
 */
public class BrazilianToAmericanLocale implements TransformBehavior{

    public Object perform(Object valueToTransform) {
        Pattern p = Pattern.compile("/");
        String[] s = p.split(valueToTransform.toString());
        StringBuilder builder = new StringBuilder();
        builder.append(s[1]);
        builder.append("/");
        builder.append(s[0]);
        builder.append("/");
        builder.append(s[2]);
        
        return builder.toString();
    }

    public Object perform(Object value1, Object value2) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

}
